#ifndef _STDIO_H_
#define _STDIO_H_

typedef void*                               FILE;
typedef char*                               va_list;

#define __va_rounded_size(TYPE)             (((sizeof(TYPE) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
#define va_start(AP, LASTARG)               (AP = ((char *)& (LASTARG) + __va_rounded_size(LASTARG)))
#define va_arg(AP, TYPE)                    (*((TYPE *)((AP += __va_rounded_size(TYPE)) - __va_rounded_size(TYPE))))
#define va_end(AP)                          (AP = (va_list)0)

/******************************************************************************/

int vsprintf(char *buf, const char *fmt, va_list args);
int sprintf(char *buf, const char *fmt, ...);
int printf(const char *fmt, ...);

#endif
